package demo.classs;

public class ClassConstructor {
	public static void main(String[] args)
	{
		Constructor cons = new Constructor("qwe", 22, true);
		cons.printInfo();
		
	}
}

class Constructor
{
	String name = new String("asd");
	int yearOld;
	boolean gender = false;
	public Constructor(String name, int yearOld, boolean gender)
	{
		this.name = name;
		this.yearOld = yearOld;
		this.gender = gender;
	}
	
	public void printInfo()
	{
		System.out.println("Ten: " + name);
		System.out.println("Tuoi: " + yearOld);
		String gioitinh = "Nu";
		if (gender)
			gioitinh = "Nam";
		System.out.println("Gioi tinh: " + gioitinh);
	}
}